package com.gxa.dao;

import com.gxa.dto.HouseDto;
import com.gxa.entity.House;
import com.gxa.entity.extend.QueryAllHouse;

import java.sql.SQLException;
import java.util.List;

/**
 * 房产 数据持久层 接口哦
 */
public interface HouseDao {
    List<House> queryHouse() throws SQLException;

    /**
     * 查询所有的House
     * @return
     */
    List<House> queryAllHouse() throws SQLException;

    /**
     * 分页查询所有的House
     * @param pageToInt 第几页
     * @param limitToInt 每页展示的数据
     * @return
     */
    List<House> selectAllHouseByPage(int pageToInt, int limitToInt) throws SQLException;
    List<House> selectHouseByHouseDto(Integer page, Integer limit, HouseDto houseDto) throws SQLException;
    Integer count() throws SQLException;
    Integer count(HouseDto houseDto) throws SQLException;

    /**
     * 增减房产
     * @param house
     * @return
     */
    int insertHouse(House house) throws SQLException;

    /**
     * 修改房产
     * @param house
     * @return
     */
    int updateHouse(House house) throws SQLException;

    /**
     * 根据id删除house
     * @param hidToInteger
     * @return
     */
    int delHouseById(Integer hidToInteger) throws SQLException;
}
